﻿@model Kooboo.CMS.Sites.Models.FileResource
@{
    ViewBag.Title = "Robots.txt".Localize();
    Layout = "~/Views/Shared/Site.cshtml";
}
@section Panel{
    <ul class="panel">
        @foreach (var group in Kooboo.CMS.Sites.Extension.UI.TopToolbar.ToolbarButtons.GetToolbarButtons(ViewContext.RequestContext))
        {
            @Html.Partial("_ToolbarGroupButtons", group)
        }
        <li>
            <a data-ajaxform="">
                @Html.IconImage("save") @("Save".Localize())</a>
        </li>
    </ul>
}
<div class="block common-form">
    <h1 class="title">@ViewBag.Title
        <a href="#" id="insertSampleCode">
            @("Sample robots.txt".Localize())</a>
    </h1>
    @using (Html.BeginForm())
    {
        <table>
            <tbody>
                <tr>
                    <td>
                        <textarea id="body" class="max" name="body" rows="1" cols="1">@Model.Body</textarea>
                    </td>
                </tr>
            </tbody>
        </table>
    }
</div>
<script>
    $(function () {
        $("#insertSampleCode").click(function () {
            $("#body").val('#sample robots file \r\nUser-agent: *\r\nDisallow: /cgi-bin/\r\nDisallow: /private/');
        });
    });
</script>
